/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.ban.ycl.ybk.e2p.yb.tools;

import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Logger;

/**
 *
 * @author root
 */
public class PatternTools {
    private static Logger logger = Logger.getLogger(PatternTools.class);
    public static boolean matchStr(String regEx, String filename) {
        Pattern p = Pattern.compile(regEx, Pattern.CASE_INSENSITIVE);
        Matcher m = p.matcher(filename);
        if (m.find()) {
            return true;
        } else {
            return false;
        }
    }
    
    public static void main(String[] args) {
        String filename = "sk";
        boolean matchStr = matchStr("", filename);
        System.out.println(matchStr);
    }
}
